<div style="padding: 25px;">
	<form class="layui-form layui-form-pane" method="post" >
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">网站标题</label>
	    <div class="layui-input-inline">
	      <input type="text" name="title" lay-verify="required" value="{$title??''}" placeholder="请输入" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  
	  
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">欢迎语</label>
	    <div class="layui-input-inline">
	      <input type="text" name="welcome_text" lay-verify="required" placeholder="名称" value="{$welcome_text??''}" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  
	 
	  <div class="layui-form-item">
	    <button class="layui-btn" lay-submit="" lay-filter="addAdmin">保存</button>
	  </div>
	</form>
</div> 
<script>

// 设置状态栏标题
var status_bar=[
    {"type":"url","url":"","title":"示例应用-网站配置"}
]
enianAdmin.render_nav_bar(status_bar);

layui.use('form', function(){
  var form = layui.form;
  
	form.render()
  	//监听提交
	form.on('submit(addAdmin)', function(data){
	   	// 接口
	    layui.$.post("{:url('saveConfig')}",data.field, function(data) {
			if(data.code==1){
				layui.layer.msg('保存成功');
				// enianAdmin.go("{:url('index/adminlist')}");
			}else{
				layui.layer.alert('保存失败')
			}
		});
		
		return false;
	});
});
</script>